<%@ taglib prefix="s" uri="/struts-tags"%>
<h2>Administration des Questions</h2>

<div>
	<s:form>
	<table class="form">
		<s:if test="creation" />
		<s:else>
			<s:hidden name="question.id" />
		</s:else>
		<tr>
			<td>Nom de la catégorie :</td>
			<td><s:select name="question.categorie.id" list="enumCategorie" listKey="id" listValue="nom" /></td>
		</tr>
		<tr>
			<td colspan="2">Question :</td>
		</tr>
		<tr>
			<td colspan="2"><s:textarea	name="question.question" rows="5" cols="100"  /></td>
		</tr>
		<tr>
			<td>Bonne réponse :</td>
			<td><s:radio name="question.yesIsAGoodResponse" list="#{true:'Oui', false:'Non'}" /></td>
		</tr>
		<tr>
			<td colspan="2">Description :</td>
		</tr>
		<tr>
			<td colspan="2"><s:textarea	name="question.description" rows="10" cols="100" /></td>
		</tr>
		<tr>
			<td colspan="2">Alerte :</td>
		</tr>
		<tr>
			<td>Niveau :</td>
			<td><s:select name="question.alerte.niveau" list="enumNiveauAlerte" /></td>
		</tr>
		<tr>
			<td colspan="2"><s:textarea	name="question.alerte.message" rows="10" cols="100" /></td>
		</tr>
		<tr>
			<s:if test="creation">
			<td><s:submit action="enregistrerQuestion" value="Enregistrer" /></td>
			</s:if>
			<s:else>
			<td><s:submit action="modifierQuestion" value="Modifier" /></td>
			</s:else>
		</tr>
	</table>
	</s:form>
</div>
